package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.DigitalSliceCase;
import com.zhijian.medical.entity.vo.request.DigitalSliceCaseSearchVo;
import com.zhijian.medical.entity.vo.response.DigitalSliceCaseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DigitalSliceCaseMapper {
    int deleteByPrimaryKey(Long id);

    int insert(DigitalSliceCase record);

    int insertSelective(DigitalSliceCase record);

    DigitalSliceCase selectByPrimaryKey(Long id);

    /**
     * 通过真实病例ID进行查询
     *
     * @param caseId
     * @return
     */
    DigitalSliceCase selectByCaseId(String caseId);

    int updateByPrimaryKeySelective(DigitalSliceCase record);

    int updateByPrimaryKey(DigitalSliceCase record);

    int count(DigitalSliceCaseSearchVo digitalSliceCaseSearchVo);

    List<DigitalSliceCaseVo> selectList(DigitalSliceCaseSearchVo digitalSliceCaseSearchVo);

    DigitalSliceCaseVo selectVoById(Long id);

    int insertBatch(@Param("entities") List<DigitalSliceCase> entities);

    /**
     * 根据年份查找出最大的病例ID
     *
     * @param year
     * @return
     */
    String selectMaxCaseIdByYear(String year);
}